<?php

class ZFKiller_View_Helper_Url extends Zend_View_Helper_Url {

	/**
	 *
	 * @param array $urlOptions
	 * @param string $routerName Nome do roteador
	 * @param boolean $reset Resetar antes de gerar
	 * @param boolean $encode Encode na URL
	 * @return type 
	 */
	public static function urlStatic(array $urlOptions = array(), $routerName = null, $reset = true, $encode = true) {
		if (!isset($urlOptions['module']))
			$urlOptions['module'] = Zend_Controller_Front::getInstance()->getRequest()->getModuleName();
		if (!isset($urlOptions['controller']))
			$urlOptions['controller'] = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
		if (!isset($urlOptions['action']))
			$urlOptions['action'] = Zend_Controller_Front::getInstance()->getRequest()->getActionName();

		$router = Zend_Controller_Front::getInstance()->getRouter();
		return $router->assemble(
						$urlOptions, (is_null($routerName) ? 'default' : $routerName), $reset, $encode
		);
	}

}